3.402 \(\int \frac {\tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx\)

Optimal. Leaf size=143 \[ -\frac {\sqrt {\sqrt {2}-1} \tan ^{-1}\left (\frac {\left (1-\sqrt {2}\right ) \tan (e+f x)-2 \sqrt {2}+3}{\sqrt {2 \left (5 \sqrt {2}-7\right )} \sqrt {\tan (e+f x)+1}}\right )}{2 f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {\left (1+\sqrt {2}\right ) \tan (e+f x)+2 \sqrt {2}+3}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {\tan (e+f x)+1}}\right )}{2 f} \]

[Out]

-1/2*arctan((3-2*2^(1/2)+(1-2^(1/2))*tan(f*x+e))/(-14+10*2^(1/2))^(1/2)/(1+tan(f*x+e))^(1/2))*(2^(1/2)-1)^(1/2
)/f-1/2*arctanh((3+2*2^(1/2)+(1+2^(1/2))*tan(f*x+e))/(14+10*2^(1/2))^(1/2)/(1+tan(f*x+e))^(1/2))*(1+2^(1/2))^(
1/2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3536, 3535, 203, 207} \[ -\frac {\sqrt {\sqrt {2}-1} \tan ^{-1}\left (\frac {\left (1-\sqrt {2}\right ) \tan (e+f x)-2 \sqrt {2}+3}{\sqrt {2 \left (5 \sqrt {2}-7\right )} \sqrt {\tan (e+f x)+1}}\right )}{2 f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {\left (1+\sqrt {2}\right ) \tan (e+f x)+2 \sqrt {2}+3}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {\tan (e+f x)+1}}\right )}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]/Sqrt[1 + Tan[e + f*x]],x]

[Out]

-(Sqrt[-1 + Sqrt[2]]*ArcTan[(3 - 2*Sqrt[2] + (1 - Sqrt[2])*Tan[e + f*x])/(Sqrt[2*(-7 + 5*Sqrt[2])]*Sqrt[1 + Ta
n[e + f*x]])])/(2*f) - (Sqrt[1 + Sqrt[2]]*ArcTanh[(3 + 2*Sqrt[2] + (1 + Sqrt[2])*Tan[e + f*x])/(Sqrt[2*(7 + 5*
Sqrt[2])]*Sqrt[1 + Tan[e + f*x]])])/(2*f)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 3535

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(-2*
d^2)/f, Subst[Int[1/(2*b*c*d - 4*a*d^2 + x^2), x], x, (b*c - 2*a*d - b*d*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]
]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && EqQ[2
*a*c*d - b*(c^2 - d^2), 0]

Rule 3536

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> With[{q =
 Rt[a^2 + b^2, 2]}, Dist[1/(2*q), Int[(a*c + b*d + c*q + (b*c - a*d + d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*
x]], x], x] - Dist[1/(2*q), Int[(a*c + b*d - c*q + (b*c - a*d - d*q)*Tan[e + f*x])/Sqrt[a + b*Tan[e + f*x]], x
], x]] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && NeQ[2
*a*c*d - b*(c^2 - d^2), 0] && (PerfectSquareQ[a^2 + b^2] || RationalQ[a, b, c, d])

Rubi steps

\begin {align*} \int \frac {\tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx &=-\frac {\int \frac {1+\left (-1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx}{2 \sqrt {2}}+\frac {\int \frac {1+\left (-1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}} \, dx}{2 \sqrt {2}}\\ &=\frac {\left (4-3 \sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{2 \left (-1+\sqrt {2}\right )-4 \left (-1+\sqrt {2}\right )^2+x^2} \, dx,x,\frac {1-2 \left (-1+\sqrt {2}\right )-\left (-1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}}\right )}{2 f}+\frac {\left (4+3 \sqrt {2}\right ) \operatorname {Subst}\left (\int \frac {1}{2 \left (-1-\sqrt {2}\right )-4 \left (-1-\sqrt {2}\right )^2+x^2} \, dx,x,\frac {1-2 \left (-1-\sqrt {2}\right )-\left (-1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {1+\tan (e+f x)}}\right )}{2 f}\\ &=-\frac {\sqrt {-1+\sqrt {2}} \tan ^{-1}\left (\frac {3-2 \sqrt {2}+\left (1-\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (-7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{2 f}-\frac {\sqrt {1+\sqrt {2}} \tanh ^{-1}\left (\frac {3+2 \sqrt {2}+\left (1+\sqrt {2}\right ) \tan (e+f x)}{\sqrt {2 \left (7+5 \sqrt {2}\right )} \sqrt {1+\tan (e+f x)}}\right )}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.03, size = 67, normalized size = 0.47 \[ -\frac {\tanh ^{-1}\left (\frac {\sqrt {\tan (e+f x)+1}}{\sqrt {1-i}}\right )}{\sqrt {1-i} f}-\frac {\tanh ^{-1}\left (\frac {\sqrt {\tan (e+f x)+1}}{\sqrt {1+i}}\right )}{\sqrt {1+i} f} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]/Sqrt[1 + Tan[e + f*x]],x]

[Out]

-(ArcTanh[Sqrt[1 + Tan[e + f*x]]/Sqrt[1 - I]]/(Sqrt[1 - I]*f)) - ArcTanh[Sqrt[1 + Tan[e + f*x]]/Sqrt[1 + I]]/(
Sqrt[1 + I]*f)

________________________________________________________________________________________

fricas [B]  time = 0.68, size = 878, normalized size = 6.14 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(1+tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

-1/4*(1/2)^(1/4)*(sqrt(1/2)*f^2*sqrt(f^(-4)) + 1)*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*(f^(-4))^(1/4)*log((
2*sqrt(1/2)*f^2*sqrt(f^(-4))*cos(f*x + e) + (1/2)^(1/4)*(2*sqrt(1/2)*f^3*sqrt(f^(-4))*cos(f*x + e) + f*cos(f*x
 + e))*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x + e) + sin(f*x + e))/cos(f*x + e))*(f^(-4))^(1/4)
 + cos(f*x + e) + sin(f*x + e))/cos(f*x + e)) + 1/4*(1/2)^(1/4)*(sqrt(1/2)*f^2*sqrt(f^(-4)) + 1)*sqrt(-4*sqrt(
1/2)*f^2*sqrt(f^(-4)) + 4)*(f^(-4))^(1/4)*log((2*sqrt(1/2)*f^2*sqrt(f^(-4))*cos(f*x + e) - (1/2)^(1/4)*(2*sqrt
(1/2)*f^3*sqrt(f^(-4))*cos(f*x + e) + f*cos(f*x + e))*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x +
e) + sin(f*x + e))/cos(f*x + e))*(f^(-4))^(1/4) + cos(f*x + e) + sin(f*x + e))/cos(f*x + e)) - (1/2)^(3/4)*sqr
t(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*(f^(-4))^(1/4)*arctan(2*(1/2)^(3/4)*(f^5*sqrt(f^(-4)) + sqrt(1/2)*f^3)*sq
rt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((2*sqrt(1/2)*f^2*sqrt(f^(-4))*cos(f*x + e) + (1/2)^(1/4)*(2*sqrt(1/
2)*f^3*sqrt(f^(-4))*cos(f*x + e) + f*cos(f*x + e))*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x + e)
+ sin(f*x + e))/cos(f*x + e))*(f^(-4))^(1/4) + cos(f*x + e) + sin(f*x + e))/cos(f*x + e))*(f^(-4))^(3/4) - 2*(
1/2)^(3/4)*(f^5*sqrt(f^(-4)) + sqrt(1/2)*f^3)*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x + e) + sin
(f*x + e))/cos(f*x + e))*(f^(-4))^(3/4) - f^2*sqrt(f^(-4)) - 2*sqrt(1/2)) - (1/2)^(3/4)*sqrt(-4*sqrt(1/2)*f^2*
sqrt(f^(-4)) + 4)*(f^(-4))^(1/4)*arctan(2*(1/2)^(3/4)*(f^5*sqrt(f^(-4)) + sqrt(1/2)*f^3)*sqrt(-4*sqrt(1/2)*f^2
*sqrt(f^(-4)) + 4)*sqrt((2*sqrt(1/2)*f^2*sqrt(f^(-4))*cos(f*x + e) - (1/2)^(1/4)*(2*sqrt(1/2)*f^3*sqrt(f^(-4))
*cos(f*x + e) + f*cos(f*x + e))*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x + e) + sin(f*x + e))/cos
(f*x + e))*(f^(-4))^(1/4) + cos(f*x + e) + sin(f*x + e))/cos(f*x + e))*(f^(-4))^(3/4) - 2*(1/2)^(3/4)*(f^5*sqr
t(f^(-4)) + sqrt(1/2)*f^3)*sqrt(-4*sqrt(1/2)*f^2*sqrt(f^(-4)) + 4)*sqrt((cos(f*x + e) + sin(f*x + e))/cos(f*x
+ e))*(f^(-4))^(3/4) + f^2*sqrt(f^(-4)) + 2*sqrt(1/2))

________________________________________________________________________________________

giac [B]  time = 1.24, size = 282, normalized size = 1.97 \[ \frac {{\left (f^{2} \sqrt {2 \, \sqrt {2} + 2} - f \sqrt {2 \, \sqrt {2} - 2} {\left | f \right |}\right )} \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} + 2 \, \sqrt {\tan \left (f x + e\right ) + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right )}{4 \, f^{3}} + \frac {{\left (f^{2} \sqrt {2 \, \sqrt {2} + 2} - f \sqrt {2 \, \sqrt {2} - 2} {\left | f \right |}\right )} \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} - 2 \, \sqrt {\tan \left (f x + e\right ) + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right )}{4 \, f^{3}} - \frac {{\left (f^{2} \sqrt {2 \, \sqrt {2} - 2} + f \sqrt {2 \, \sqrt {2} + 2} {\left | f \right |}\right )} \log \left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} \sqrt {\tan \left (f x + e\right ) + 1} + \sqrt {2} + \tan \left (f x + e\right ) + 1\right )}{8 \, f^{3}} + \frac {{\left (f^{2} \sqrt {2 \, \sqrt {2} - 2} + f \sqrt {2 \, \sqrt {2} + 2} {\left | f \right |}\right )} \log \left (-2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} \sqrt {\tan \left (f x + e\right ) + 1} + \sqrt {2} + \tan \left (f x + e\right ) + 1\right )}{8 \, f^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(1+tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

1/4*(f^2*sqrt(2*sqrt(2) + 2) - f*sqrt(2*sqrt(2) - 2)*abs(f))*arctan(1/2*2^(3/4)*(2^(1/4)*sqrt(sqrt(2) + 2) + 2
*sqrt(tan(f*x + e) + 1))/sqrt(-sqrt(2) + 2))/f^3 + 1/4*(f^2*sqrt(2*sqrt(2) + 2) - f*sqrt(2*sqrt(2) - 2)*abs(f)
)*arctan(-1/2*2^(3/4)*(2^(1/4)*sqrt(sqrt(2) + 2) - 2*sqrt(tan(f*x + e) + 1))/sqrt(-sqrt(2) + 2))/f^3 - 1/8*(f^
2*sqrt(2*sqrt(2) - 2) + f*sqrt(2*sqrt(2) + 2)*abs(f))*log(2^(1/4)*sqrt(sqrt(2) + 2)*sqrt(tan(f*x + e) + 1) + s
qrt(2) + tan(f*x + e) + 1)/f^3 + 1/8*(f^2*sqrt(2*sqrt(2) - 2) + f*sqrt(2*sqrt(2) + 2)*abs(f))*log(-2^(1/4)*sqr
t(sqrt(2) + 2)*sqrt(tan(f*x + e) + 1) + sqrt(2) + tan(f*x + e) + 1)/f^3

________________________________________________________________________________________

maple [B]  time = 0.15, size = 297, normalized size = 2.08 \[ \frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (1+\sqrt {2}-\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{8 f}-\frac {\arctan \left (\frac {2 \sqrt {1+\tan \left (f x +e \right )}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{2 f \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+\tan \left (f x +e \right )}-\sqrt {2 \sqrt {2}+2}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}}-\frac {\sqrt {2 \sqrt {2}+2}\, \sqrt {2}\, \ln \left (1+\sqrt {2}+\sqrt {2 \sqrt {2}+2}\, \sqrt {1+\tan \left (f x +e \right )}+\tan \left (f x +e \right )\right )}{8 f}-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {1+\tan \left (f x +e \right )}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{2 f \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {2}+2}+2 \sqrt {1+\tan \left (f x +e \right )}}{\sqrt {-2+2 \sqrt {2}}}\right )}{f \sqrt {-2+2 \sqrt {2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)/(1+tan(f*x+e))^(1/2),x)

[Out]

1/8/f*(2*2^(1/2)+2)^(1/2)*2^(1/2)*ln(1+2^(1/2)-(2*2^(1/2)+2)^(1/2)*(1+tan(f*x+e))^(1/2)+tan(f*x+e))-1/2/f/(-2+
2*2^(1/2))^(1/2)*arctan((2*(1+tan(f*x+e))^(1/2)-(2*2^(1/2)+2)^(1/2))/(-2+2*2^(1/2))^(1/2))*2^(1/2)+1/f/(-2+2*2
^(1/2))^(1/2)*arctan((2*(1+tan(f*x+e))^(1/2)-(2*2^(1/2)+2)^(1/2))/(-2+2*2^(1/2))^(1/2))-1/8/f*(2*2^(1/2)+2)^(1
/2)*2^(1/2)*ln(1+2^(1/2)+(2*2^(1/2)+2)^(1/2)*(1+tan(f*x+e))^(1/2)+tan(f*x+e))-1/2/f/(-2+2*2^(1/2))^(1/2)*arcta
n(((2*2^(1/2)+2)^(1/2)+2*(1+tan(f*x+e))^(1/2))/(-2+2*2^(1/2))^(1/2))*2^(1/2)+1/f/(-2+2*2^(1/2))^(1/2)*arctan((
(2*2^(1/2)+2)^(1/2)+2*(1+tan(f*x+e))^(1/2))/(-2+2*2^(1/2))^(1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan \left (f x + e\right )}{\sqrt {\tan \left (f x + e\right ) + 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(1+tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(tan(f*x + e)/sqrt(tan(f*x + e) + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.26, size = 69, normalized size = 0.48 \[ -2\,\mathrm {atanh}\left (2\,f\,\sqrt {\frac {\frac {1}{8}-\frac {1}{8}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\right )\,\sqrt {\frac {\frac {1}{8}-\frac {1}{8}{}\mathrm {i}}{f^2}}-2\,\mathrm {atanh}\left (2\,f\,\sqrt {\frac {\frac {1}{8}+\frac {1}{8}{}\mathrm {i}}{f^2}}\,\sqrt {\mathrm {tan}\left (e+f\,x\right )+1}\right )\,\sqrt {\frac {\frac {1}{8}+\frac {1}{8}{}\mathrm {i}}{f^2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)/(tan(e + f*x) + 1)^(1/2),x)

[Out]

- 2*atanh(2*f*((1/8 - 1i/8)/f^2)^(1/2)*(tan(e + f*x) + 1)^(1/2))*((1/8 - 1i/8)/f^2)^(1/2) - 2*atanh(2*f*((1/8
+ 1i/8)/f^2)^(1/2)*(tan(e + f*x) + 1)^(1/2))*((1/8 + 1i/8)/f^2)^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan {\left (e + f x \right )}}{\sqrt {\tan {\left (e + f x \right )} + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)/(1+tan(f*x+e))**(1/2),x)

[Out]

Integral(tan(e + f*x)/sqrt(tan(e + f*x) + 1), x)

________________________________________________________________________________________